<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>CSS 波浪导航</title>
  <style>
    body{
      margin: 0;
      padding: 0;
    }
    .nav {
      width: 200px; /* 不要设置高度 */
      position: fixed;
      right: 0;
      top: 100px;
    }
    .nav:hover .item{
      left: 0;
    }
    ul {
      list-style-type: none;
      padding: 0;
      margin: 0;
    }
    .item {
      height: 40px;
      line-height: 40px;
      margin-bottom: 2px;
      background-color: rgba(221, 63, 63, 0.5);
      color: white;
      position: relative;
      left: 159px;
      transition: 0.5s;
      cursor: pointer;
    }
    .item span {
      width: 40px;
      height: 40px;
      display: inline-block;
      text-align: center;
      font-weight: bold;
      background: palevioletred;
      margin-right: 5px;
    }
  </style>
</head>
<body>
  <div class="nav">
    <ul>
      <li class="item"><span>0</span>HTML5</li>
      <li class="item"><span>1</span>CSS3</li>
      <li class="item"><span>2</span>C#</li>
      <li class="item"><span>3</span>Python</li>
      <li class="item"><span>4</span>Javascript</li>
      <li class="item"><span>5</span>HTML5</li>
      <li class="item"><span>6</span>CSS3</li>
      <li class="item"><span>7</span>C#</li>
      <li class="item"><span>8</span>Python</li>
      <li class="item"><span>9</span>Javascript</li>
    </ul>
    <script>
      let list = document.querySelectorAll('.item')
      list.forEach(function(item, i){
        item.style.transitionDelay = (i+1) * 0.05 +'s'
      })
    </script>
  </div>
</body>
</html>